3.1.36 \(\int \frac {(g+h x) \sqrt {a+b x+c x^2}}{(a d+b d x+c d x^2)^2} \, dx\) [36]

Optimal. Leaf size=48 \[ -\frac {2 (b g-2 a h+(2 c g-b h) x)}{\left (b^2-4 a c\right ) d^2 \sqrt {a+b x+c x^2}} \]

[Out]

-2*(b*g-2*a*h+(-b*h+2*c*g)*x)/(-4*a*c+b^2)/d^2/(c*x^2+b*x+a)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {1012, 650} \begin {gather*} -\frac {2 (-2 a h+x (2 c g-b h)+b g)}{d^2 \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((g + h*x)*Sqrt[a + b*x + c*x^2])/(a*d + b*d*x + c*d*x^2)^2,x]

[Out]

(-2*(b*g - 2*a*h + (2*c*g - b*h)*x))/((b^2 - 4*a*c)*d^2*Sqrt[a + b*x + c*x^2])

Rule 650

Int[((d_.) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(3/2), x_Symbol] :> Simp[-2*((b*d - 2*a*e + (2*c*
d - b*e)*x)/((b^2 - 4*a*c)*Sqrt[a + b*x + c*x^2])), x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] &&
NeQ[b^2 - 4*a*c, 0]

Rule 1012

Int[((g_.) + (h_.)*(x_))^(m_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_)
, x_Symbol] :> Dist[(c/f)^p, Int[(g + h*x)^m*(d + e*x + f*x^2)^(p + q), x], x] /; FreeQ[{a, b, c, d, e, f, g,
h, p, q}, x] && EqQ[c*d - a*f, 0] && EqQ[b*d - a*e, 0] && (IntegerQ[p] || GtQ[c/f, 0]) && ( !IntegerQ[q] || Le
afCount[d + e*x + f*x^2] <= LeafCount[a + b*x + c*x^2])

Rubi steps

\begin {align*} \int \frac {(g+h x) \sqrt {a+b x+c x^2}}{\left (a d+b d x+c d x^2\right )^2} \, dx &=\frac {\int \frac {g+h x}{\left (a+b x+c x^2\right )^{3/2}} \, dx}{d^2}\\ &=-\frac {2 (b g-2 a h+(2 c g-b h) x)}{\left (b^2-4 a c\right ) d^2 \sqrt {a+b x+c x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.37, size = 46, normalized size = 0.96 \begin {gather*} \frac {-2 b g+4 a h-4 c g x+2 b h x}{\left (b^2-4 a c\right ) d^2 \sqrt {a+x (b+c x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((g + h*x)*Sqrt[a + b*x + c*x^2])/(a*d + b*d*x + c*d*x^2)^2,x]

[Out]

(-2*b*g + 4*a*h - 4*c*g*x + 2*b*h*x)/((b^2 - 4*a*c)*d^2*Sqrt[a + x*(b + c*x)])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(94\) vs. \(2(46)=92\).
time = 0.17, size = 95, normalized size = 1.98

method result size
gosper \(-\frac {2 \left (b h x -2 c g x +2 a h -b g \right )}{\sqrt {c \,x^{2}+b x +a}\, d^{2} \left (4 a c -b^{2}\right )}\) \(48\)
trager \(-\frac {2 \left (b h x -2 c g x +2 a h -b g \right )}{\sqrt {c \,x^{2}+b x +a}\, d^{2} \left (4 a c -b^{2}\right )}\) \(48\)
default \(\frac {h \left (-\frac {1}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (2 c x +b \right )}{c \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )+\frac {2 g \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}}{d^{2}}\) \(95\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)*(c*x^2+b*x+a)^(1/2)/(c*d*x^2+b*d*x+a*d)^2,x,method=_RETURNVERBOSE)

[Out]

1/d^2*(h*(-1/c/(c*x^2+b*x+a)^(1/2)-b/c*(2*c*x+b)/(4*a*c-b^2)/(c*x^2+b*x+a)^(1/2))+2*g*(2*c*x+b)/(4*a*c-b^2)/(c
*x^2+b*x+a)^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(c*x^2+b*x+a)^(1/2)/(c*d*x^2+b*d*x+a*d)^2,x, algorithm="maxima")

[Out]

integrate(sqrt(c*x^2 + b*x + a)*(h*x + g)/(c*d*x^2 + b*d*x + a*d)^2, x)

________________________________________________________________________________________

Fricas [A]
time = 0.50, size = 85, normalized size = 1.77 \begin {gather*} -\frac {2 \, \sqrt {c x^{2} + b x + a} {\left (b g - 2 \, a h + {\left (2 \, c g - b h\right )} x\right )}}{{\left (b^{2} c - 4 \, a c^{2}\right )} d^{2} x^{2} + {\left (b^{3} - 4 \, a b c\right )} d^{2} x + {\left (a b^{2} - 4 \, a^{2} c\right )} d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(c*x^2+b*x+a)^(1/2)/(c*d*x^2+b*d*x+a*d)^2,x, algorithm="fricas")

[Out]

-2*sqrt(c*x^2 + b*x + a)*(b*g - 2*a*h + (2*c*g - b*h)*x)/((b^2*c - 4*a*c^2)*d^2*x^2 + (b^3 - 4*a*b*c)*d^2*x +
(a*b^2 - 4*a^2*c)*d^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {g}{a \sqrt {a + b x + c x^{2}} + b x \sqrt {a + b x + c x^{2}} + c x^{2} \sqrt {a + b x + c x^{2}}}\, dx + \int \frac {h x}{a \sqrt {a + b x + c x^{2}} + b x \sqrt {a + b x + c x^{2}} + c x^{2} \sqrt {a + b x + c x^{2}}}\, dx}{d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(c*x**2+b*x+a)**(1/2)/(c*d*x**2+b*d*x+a*d)**2,x)

[Out]

(Integral(g/(a*sqrt(a + b*x + c*x**2) + b*x*sqrt(a + b*x + c*x**2) + c*x**2*sqrt(a + b*x + c*x**2)), x) + Inte
gral(h*x/(a*sqrt(a + b*x + c*x**2) + b*x*sqrt(a + b*x + c*x**2) + c*x**2*sqrt(a + b*x + c*x**2)), x))/d**2

________________________________________________________________________________________

Giac [A]
time = 3.21, size = 81, normalized size = 1.69 \begin {gather*} -\frac {2 \, {\left (\frac {{\left (2 \, c d^{2} g - b d^{2} h\right )} x}{b^{2} d^{4} - 4 \, a c d^{4}} + \frac {b d^{2} g - 2 \, a d^{2} h}{b^{2} d^{4} - 4 \, a c d^{4}}\right )}}{\sqrt {c x^{2} + b x + a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(c*x^2+b*x+a)^(1/2)/(c*d*x^2+b*d*x+a*d)^2,x, algorithm="giac")

[Out]

-2*((2*c*d^2*g - b*d^2*h)*x/(b^2*d^4 - 4*a*c*d^4) + (b*d^2*g - 2*a*d^2*h)/(b^2*d^4 - 4*a*c*d^4))/sqrt(c*x^2 +
b*x + a)

________________________________________________________________________________________

Mupad [B]
time = 3.75, size = 49, normalized size = 1.02 \begin {gather*} \frac {4\,a\,h-2\,b\,g+2\,b\,h\,x-4\,c\,g\,x}{\left (b^2\,d^2-4\,a\,c\,d^2\right )\,\sqrt {c\,x^2+b\,x+a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((g + h*x)*(a + b*x + c*x^2)^(1/2))/(a*d + b*d*x + c*d*x^2)^2,x)

[Out]

(4*a*h - 2*b*g + 2*b*h*x - 4*c*g*x)/((b^2*d^2 - 4*a*c*d^2)*(a + b*x + c*x^2)^(1/2))

________________________________________________________________________________________